<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">  
    <title>个人信息</title>
    <link rel="stylesheet" href="__PUBLIC__/Home/css/member.css">
    <link rel="stylesheet" href="__PUBLIC__/Home/js/calendar/mobiscroll.css" />
    <link rel="stylesheet" href="__PUBLIC__/Home/js/calendar/mobiscroll_date.css" />
    <include file="Public/common_js"/>
</head>
<body>
	<div class="warp">
		<div class="member-info">
			<!-- 头像 -->
			<div class="head-bar">
                <div class="user-logo">
                    <input type="file" name="file" id="upImgBtn" />
                    <!-- 用户头像动态的 -->
                    <img id="user-logo-pic" class="img-lazyload" src="__PUBLIC__/Home/images/member_headLogo.png" data-original="{$user_top_img}" />
                    <input id="usericon" type="hidden" value="{$user_top_img}">
                </div>
				<div class="account">
					<p><span>{$menber_data['nickname']}</span><span>2</span></p>
					<p><a href="{:url('Login/alterMobileOne')}">{$menber_data['mobile']}</a></p>
				</div>
				<div class="address"><a href="{:url('Member/memberAddress')}">收货地址</a></div>
			</div>
			<!-- 个人信息 -->
			<div class="person-info">
				<h1 class="clearfix">个人信息<a href="javascript:void(0);" class="fr edit">编辑</a><a href="javascript:void(0);" class="fr complete" style="display:none;">完成</a></h1>
				<ul>
					<li><label>昵称：</label><input type="text" id="nickname" name="nickname" value="{$menber_data['nickname']}" disabled><a href="javascript:void(0);" class="clear"></a></li>
					<li><label>性别：</label><input type="text" id="sex" name="sex" value="{:search(['女','男'],$menber_data['sex'])}" disabled><a href="javascript:void(0);" class="clear"></a></li>
					<li><label>生日：</label><input type="text" id="birthday" name="age" value="<?php echo $menber_data['b_year'] ? $menber_data['b_year'].'-'.$menber_data['b_month'].'-'.$menber_data['b_day'] : '' ?>" disabled><a href="javascript:void(0);" class="clear"></a></li>
                    <li>
                        <label>身份证号：</label>
                        <span id="ycInfoIdNum" class="idcode"></span>
                        <if condition="$menber_data['identity_verifi'] eq '1'">
                            <span class="idmsg succ">已审核</span>
                        <elseif condition="$menber_data['identity_verifi'] eq '3'"/>
                            <span class="idmsg succ">审核中</span>
                        <elseif condition="$menber_data['identity_verifi'] eq '2'"/>
                            <span id="ycIdUploadBtn" class="idmsg err">审核失败<br/>请重新上传</span>
                        </if>
                    </li>
				</ul>
			</div>
			<!-- 基本信息 -->
			<div class="basic-info">
				<h1 class="clearfix">基本信息</h1>
				<ul>
					<li>账号等级：<span>{$menber_data['lv_name']}</span></li>
					<li>账号特权：<span>{$menber_data['source2']}</span></li>
					<li>绑定手机：<span>{$menber_data['mobile']}</span></li>
					<li>默认地址：<span>{$menber_addr['addr']}</span></li>
				</ul>
			</div>
		</div>
    </div>
    <div class="alert-popup validate-tips">
        <p></p>
        <div class="single-show"><a href="javascript:void(0);" class="confirm">知道了</a></div>
    </div>
    <script type="text/javascript" src="__PUBLIC__/Home/js/validate.js" ></script>
    <script type="text/javascript" src="__PUBLIC__/Home/js/jquery.ajaxfileupload.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Home/js/calendar/mobiscroll_date.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Home/js/calendar/mobiscroll.js"></script>
    <script type="text/javascript">
        var currYear = (new Date()).getFullYear();
        var opt={};
        opt.date = {preset : 'date'};
        opt.datetime = {preset : 'datetime'};
        opt.time = {preset : 'time'};
        opt.default = {
            theme: 'android-ics light', //皮肤样式
            display: 'modal', //显示方式
            mode: 'scroller', //日期选择模式
            dateFormat: 'yyyy-mm-dd',
            lang: 'zh',
            showNow: true,
            nowText: "今天",
            startYear: currYear - 50, //开始年份
            endYear: currYear + 10 //结束年份
        };
        $("#birthday").mobiscroll($.extend(opt['date'], opt['default']));
		require(['member/info']);
	</script>
   <php>
    	$isNeedId = false;
        $isValidIDInfo = true;
        //身份证号码
        $curIdNum = $menber_data['identity_card_num'];
        //身份证名
        $curIdName = $menber_data['identity_name'];
        //身份证照片
        $curIdPhoto = $menber_data['identity_photo'];
        /*身份证验证，默认0,验证通过1,验证不过2,申请审核3*/
    	$curIdStatus = intval($menber_data['identity_verifi']);
        $sfyz_type = 0;
        if($curIdStatus == 2){
        	$sfyz_type = empty($curIdPhoto) ? 1 : 2;
        	$isValidIDInfo = false;
            $isNeedId = true;
        }
        if($isNeedId){
            $sfNeedJs = array('validate' => false, 'upload' => false);
            echo '<script type="text/javascript">';
            echo 'var _ycIdData = {"yzType" : '.$sfyz_type.', "idNum" : "'.$curIdNum.'", "idName" : "'.$curIdName.'", "from" : "info"}';
            echo '</script>';		
    </php>
    <include file="Public/id_validate"/>
    <php>
        }else{
        echo '<script type="text/javascript">';
        echo '$("#ycInfoIdNum").html("'.$curIdNum.'")';
        echo '</script>';
        }
    </php>
</body>
</html>
